package com.example.anno.ioc;

import com.example.anno.ConfigScan;
import com.example.anno.entity.Blue;
import com.example.anno.entity.Green;
import com.example.anno.entity.Red;
import com.example.anno.entity.UserInfo;
import org.springframework.context.annotation.*;

// @Configuration
@ComponentScan
@PropertySource("classpath:/db.properties")
@ImportResource("classpath:/beans.xml")
@Import({Red.class, Green.class, Blue.class,
        ColorImportSelector.class,                 // batch handle
        RainBowImportDefinitionRegistry.class})    // condition registry contents
public class DIConfig {


    @Bean
    public UserInfo userInfo() {
        return UserInfo.builder().username("kite").email("kite.@gmail.com").build();
    }
}
